<%@page import="entity.User"%>
<%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <title>主页</title>
  </head>
  
  <body>
    当前在线人数：${userNumber}<br />
    <%
    	ArrayList<User>userList =(ArrayList<User>) request.getServletContext().getAttribute("userList");
  
    	if(userList!=null){
	    	for(User user:userList){
	%>
				IP:<%=user.getIp() %>，sessionID:<%=user.getSessionId() %>，第一次访问的时间：<%=user.getFirstAccseeTime() %><br />
	<%	    		
	    	}
    	}
    %>
  </body>
</html>
